import request from "@/utils/request";

export function getQuestionList(params) {
  return request({
    url: "/exam/question",
    method: "GET",
    params
  });
}
export function addQuestionList(data) {
  return request({
    url: "/exam/question",
    method: "POST",
    data
  });
}
export function getTreeList(data) {
  return request({
    url: "/subject/tree",
    method: "GET",
    data,
  });
}
export function editQuestionShow(data) {
  return request({
    url: "/exam/question/show",
    method: "POST",
    data,
  });
}
export function deleteQuestion(id) {
  return request({
    url: "/exam/question/" + id,
    method: "DELETE",
  });
}
export function getQuestion(id) {
  return request({
    url: "/exam/question/" + id,
    method: "GET",
  });
}
export function putQuestion(id,data) {
  return request({
    url: "/exam/question/" + id,
    method: "PUT",
    data
  });
}
export function getPaperList(params) {
  return request({
    url: "/exam/paper",
    method: "GET",
    params
  });
}
export function getExamPaper(id) {
  return request({
    url: "/exam/paper/"+id,
    method: "GET",
    
  });
}
export function addPaperList(data) {
  return request({
    url: "/exam/paper",
    method: "POST",
    data
  });
}
export function PutPaperList(data,id) {
  return request({
    url: "/exam/paper/"+id,
    method: "PUT",
    data,
  });
}
export function deletePaper(id) {
  return request({
    url: "/exam/paper/" + id,
    method: "DELETE",
  });
}
export function editQuestionCheck(data) {
  return request({
    url: "/exam/question/check",
    method: "POST",
    data
  });
}
export function getExamList(params) {
  return request({
    url: "/exam/exam",
    method: "get",
    params
  });
}
export function addExamList(data) {
  return request({
    url: "/exam/exam",
    method: "post",
    data
  });
}
export function delExamList(id) {
  return request({
    url: "/exam/exam/"+id,
    method: "DELETE",
    
  });
}
export function cancelBindClass(data) {
  return request({
    url: "/exam/exam/bindClass",
    method: "post",
    data,
  });
}
export function getClassName(params) {
  return request({
    url: "class/class",
    method: "GET",
    params,
  });
}
